#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>

using namespace std;

bool canPartition(vector<int>& nums) {
    int sum = 0;
    for (auto e : nums)
        sum += e;
    if (sum % 2 == 1)
        return false;

    int n = nums.size();
    int col = sum / 2;
    vector<bool> dp(col + 1);
    dp[0] = true;

    for (int i = 1; i <= n; ++i)
        for (int j = col; j >= nums[i - 1]; --j)
            if (j >= nums[i - 1])
                dp[j] = dp[j] || dp[j - nums[i - 1]];

    return dp[col];
}

int main()
{

	return 0;
}